package javacore.io.demo_12_2;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class TinyEdit {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		 String str[] = new String[100];
		 System.out.println("Enter lines of text.");
		 System.out.println("Enter 'stop' to quit.");
		 
		 for(int i=0 ; i<100 ;i++){
			 str[i] = br.readLine();
			 if("stop".equals(str[i])){
				 break;
			 }
		 }
		 
		 System.out.println("\nHere is your file:");
		 
		 for(int i=0;i<100;i++){
			 if("stop".equals(str[i])){
				 break;
			 }
			 System.out.println(str[i]);
		 }
	}

}
